/**
 * 维护聊天工作流
 */
import { Service } from '@gnlab/utils'
import type { Services } from '@/services'
import {
  getChatFlows,
  addOrUpdateChatFlow,
  removeChatFlow,
  getChatFlowContacts,
  getBoundChatFlow,
  bindChatFlow,
  unbindChatFlow,
  getChatFlowApplyRecords,
} from './api'

export * from './definition'

export class ChatFlows extends Service<Services> {
  readonly load = getChatFlows
  readonly addOrUpdate = addOrUpdateChatFlow
  readonly remove = removeChatFlow

  readonly getContactsOfFlow = getChatFlowContacts
  readonly getBoundFlow = getBoundChatFlow
  readonly bind = bindChatFlow
  readonly unbind = unbindChatFlow
  readonly getApplyRecords = getChatFlowApplyRecords
}
